/**
 */
package com.dingpeikeji.quickdeer.core.modules.exchg.entity;

import java.util.Date;

import com.dingpeikeji.quickdeer.core.common.persistence.DataEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.dingpeikeji.quickdeer.core.modules.bus.entity.TCompBus;
import com.dingpeikeji.quickdeer.core.modules.sys.entity.Office;

/**
 * 车辆调拨Entity
 * @author Zhaoy
 * @version 2016-06-29
 */
public class TBusExchg extends DataEntity<TBusExchg> {
	
	private static final long serialVersionUID = 1L;
	private String busexchgid;			// busexchgid
	private TCompBus compbus;			//车辆信息
	private Office sourcecompany;		// sourcecompany
	private Office destcompany;			// destcompany
	private Date startdate;				// startdate
	private Date enddate;				// enddate
	private String exchgtype;			// exchgtype
	
	public TBusExchg() {
		super();
	}

	public TBusExchg(String id){
		super(id);
	}

	public String getBusexchgid() {
		return busexchgid;
	}

	public void setBusexchgid(String busexchgid) {
		this.busexchgid = busexchgid;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="startdate不能为空")
	public Date getStartdate() {
		return startdate;
	}

	public void setStartdate(Date startdate) {
		this.startdate = startdate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEnddate() {
		return enddate;
	}

	public void setEnddate(Date enddate) {
		this.enddate = enddate;
	}
	
	@Length(min=0, max=1, message="exchgtype长度必须介于 0 和 1 之间")
	public String getExchgtype() {
		return exchgtype;
	}

	public void setExchgtype(String exchgtype) {
		this.exchgtype = exchgtype;
	}

	public TCompBus getCompbus() {
		return compbus;
	}

	public void setCompbus(TCompBus compbus) {
		this.compbus = compbus;
	}

	public Office getSourcecompany() {
		return sourcecompany;
	}

	public void setSourcecompany(Office sourcecompany) {
		this.sourcecompany = sourcecompany;
	}

	public Office getDestcompany() {
		return destcompany;
	}

	public void setDestcompany(Office destcompany) {
		this.destcompany = destcompany;
	}
	
}
